<notempty name="consult_list">
    <div id="consult-list-content">
        <volist name="consult_list" id="vl">
            <div class="item">
                <div class="user">
                    <span class="u-name">网　　友：<a ucard="{$vl.uid}">{$vl.user_nickname}</a></span>
                    <span class="date-ask">{$vl.create_time|friendlyDate}</span>
                    <if condition="check_auth('Addons/Consult/Consult/delete',$vl['goods_uid'])">
                        <div class="pull-right" style="margin-left: 10px;"><a data-role="consult_delete" data-id="{$vl.id}" style="color: #C7C7C7;">删除</a></div>
                    </if>
                    <if condition="check_auth('Addons/Consult/Consult/answer',$vl['goods_uid'])">
                        <if condition="$vl['answer'] neq ''">
                            <div class="pull-right"><a data-role="consult_answer" data-id="{$vl.id}" style="color: #C7C7C7;">编辑回复</a></div>
                            <else/>
                            <div class="pull-right"><a data-role="consult_answer" data-id="{$vl.id}" style="color: #4F8AD0;">回复</a></div>
                        </if>
                    </if>
                </div>
                <dl class="ask">
                    <dt><b></b>咨询内容：</dt>
                    <dd>{$vl.content}</dd>
                </dl>
                <dl class="answer" style="color: #6A9CD7;">
                    <dt>客服回复：</dt>
                    <dd>
                        <if condition="$vl['answer'] neq ''">
                            <div class="pull-right" style="color: #9C9A9C;">{$vl.update_time|friendlyDate}</div>
                            <div class="content" style="margin-right: 150px;">{$vl.answer}</div>
                            <else/>
                            <div class="content" style="margin-right: 150px;">还未回复，请耐心等待</div>
                        </if>
                    </dd>
                </dl>
            </div>
        </volist>
    </div>

    <div class="clearfix" style="margin-top: 10px;">
        <div class="total hide-pop pull-right">
            共<strong>{$consult_totalCount}</strong>条&nbsp;&nbsp;
            当前浏览了<strong id="consult-already-show">{:count($consult_list)}</strong>条&nbsp;&nbsp;
            <notempty name="show_more">
                <a id="consult_show_more" href="javascript:void(0);" data-role="consult_show_more">浏览更多咨询信息&gt;&gt;</a>
            </notempty>
        </div>
        <if condition="check_auth('Addons/Consult/Consult/ask')">
            <div class="pull-left">
                购买之前，如有问题，请<a data-role="send_consult" style="padding: 5px 2px;font-size: 15px;color: #4F8AD0;">[发表咨询]</a>
            </div>
        </if>
    </div>
    <script>
        $(function(){
            consult_function.bind_send();
            consult_function.bind_answer();
            consult_function.bind_delete();
            var show_more="{$show_more}";
            if(show_more){
                consult_info.now_page=1;
                $('[data-role="consult_show_more"]').click(function(){
                    consult_info.now_page++;
                    $.post(consult_info.show_more_url,{table_name:consult_info.table_name,row_id:consult_info.row_id,limit:consult_info.limit,type_id:consult_info.type_id,consult_keyword:consult_info.keyword,page:consult_info.now_page},function(msg){
                        $('#consult-list-content').append(msg.html);
                        $('#consult-already-show').html(msg.show_num);
                        if(!msg.show_more){
                            $('#consult_show_more').hide();
                        }
                    },'json');
                });
            }
        });
    </script>
    <else/>
    <div style="padding: 10px;text-align: center;font-size: 25px;color: #AEAEAE;">
        没有相关咨询吆~
    </div>
</notempty>
